﻿namespace Landpy.CruiseControlNet.Infrastructure.Aop.DependencyInjection
{
    /// <summary>
    /// Log4Net third-part log.
    /// </summary>
    public class Log4NetLog : ILog
    {
        private log4net.ILog Log { get; set; }

        public Log4NetLog(string loggerName)
        {
            this.Log = log4net.LogManager.GetLogger(loggerName);
        }

        /// <summary>
        /// Write log.
        /// </summary>
        /// <param name="message">Log content.</param>
        public void Write(string message)
        {
            this.Log.Error(message);
        }
    }
}
